<template>
	<view class="container">
		<uni-nav-bar :title="pageTitle" left-icon="back" @clickLeft="back"></uni-nav-bar>
		<view class="content">
			<text>这里是{{ pageTitle }}列表</text>
		</view>
	</view>
</template>

<script setup>
import { ref } from 'vue';
import { onLoad } from '@dcloudio/uni-app';

const pageTitle = ref('');

onLoad((options) => {
	if (options.type === 'parking') {
		pageTitle.value = '找停车';
	} else if (options.type === 'charging') {
		pageTitle.value = '找充电';
	}
});

const back = () => {
	uni.navigateBack();
};
</script>

<style scoped>
.container {
	padding: 20rpx;
}
.content {
	text-align: center;
	margin-top: 100rpx;
}
</style>